using SimpleJSON;
using UnityEngine.UI;

namespace Gj
{
    public class LogHelper : NodeHelper
    {
        private Text _Text;

        private Text Text
        {
            get
            {
                if (_Text == null) _Text = GetComponent<Text>();
                return _Text;
            }
        }

        protected override BindDataType bindDataType => BindDataType.All;

        protected override void BindData(JSONObject json)
        {
            Text.text = string.Format("{0} {1} {2}", json["date"].Value, json["category"].Value, json["value"].Value);
        }
    }
}